import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { HomeComponent } from '../component/home/home.component';

// 菜单
import { MenuListComponent } from '../component/menu/menu.list.component';
import { MenuEditComponent } from '../component/menu/menu.edit.component';
// 人员
import { UserListComponent } from '../component/user/user.list.component';
import { UserEditComponent } from '../component/user/user.edit.component';
// 角色
import { RoleListComponent } from '../component/role/role.list.component';
import { RoleEditComponent } from '../component/role/role.edit.component';

import { DemoListComponent } from '../component/demo/demo.list.component';
import { DemoEditComponent } from '../component/demo/demo.edit.component';


const appRoutes: Routes = [
    { path: 'home', component: HomeComponent },

    { path: 'menu/list', component: MenuListComponent },
    { path: 'menu/edit/:type/:id', component: MenuEditComponent },

    { path: 'user/list', component: UserListComponent },
    { path: 'user/edit/:id', component: UserEditComponent },

    { path: 'role/list', component: RoleListComponent },
    { path: 'role/edit/:id', component: RoleEditComponent },

    { path: 'demo/list', component: DemoListComponent },
    { path: 'demo/edit/:id', component: DemoEditComponent },

];

@NgModule({
    imports: [
        RouterModule.forChild(appRoutes)
    ],
    exports: [
        RouterModule
    ],
    providers: [
    ]
})
export class SystemRouter { }

